/**
 * Description:
 * Class Name:subject_2
 * Date:2022/2/14 12:42
 *
 * @author LTisme
 * @version JAVA17
 */
package 疯狂Java讲义.第6章_面向对象_下.课后练习;

interface an_interface{
    void printer();
    default String strGetter(){
        return "just a String";
    }
}

public class subject_2 {
    public static void main(String[] args) {
        // 通过匿名内部类实现接口实例
        an_interface IF = new an_interface() {
            @Override
            public void printer() {
                System.out.println(this.strGetter());
            }
        };
        IF.printer();
    }
}
